\(\int \frac {1}{x \sqrt {4+12 x+9 x^2}} \, dx\) [2419]

   Optimal result
   Rubi [B] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 18, antiderivative size = 27 \[ \int \frac {1}{x \sqrt {4+12 x+9 x^2}} \, dx=-\frac {(2+3 x) \text {arctanh}(1+3 x)}{\sqrt {4+12 x+9 x^2}} \]

[Out]

-(2+3*x)*arctanh(1+3*x)/((2+3*x)^2)^(1/2)

Rubi [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(55\) vs. \(2(27)=54\).

Time = 0.01 (sec) , antiderivative size = 55, normalized size of antiderivative = 2.04, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.222, Rules used = {660, 36, 29, 31} \[ \int \frac {1}{x \sqrt {4+12 x+9 x^2}} \, dx=\frac {(3 x+2) \log (x)}{2 \sqrt {9 x^2+12 x+4}}-\frac {(3 x+2) \log (3 x+2)}{2 \sqrt {9 x^2+12 x+4}} \]

[In]

Int[1/(x*Sqrt[4 + 12*x + 9*x^2]),x]

[Out]

((2 + 3*x)*Log[x])/(2*Sqrt[4 + 12*x + 9*x^2]) - ((2 + 3*x)*Log[2 + 3*x])/(2*Sqrt[4 + 12*x + 9*x^2])

Rule 29

Int[(x_)^(-1), x_Symbol] :> Simp[Log[x], x]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 36

Int[1/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Dist[b/(b*c - a*d), Int[1/(a + b*x), x], x] -
Dist[d/(b*c - a*d), Int[1/(c + d*x), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0]

Rule 660

Int[((d_.) + (e_.)*(x_))^(m_)*((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Dist[(a + b*x + c*x^2)^Fra
cPart[p]/(c^IntPart[p]*(b/2 + c*x)^(2*FracPart[p])), Int[(d + e*x)^m*(b/2 + c*x)^(2*p), x], x] /; FreeQ[{a, b,
 c, d, e, m, p}, x] && EqQ[b^2 - 4*a*c, 0] &&  !IntegerQ[p] && NeQ[2*c*d - b*e, 0]

Rubi steps \begin{align*} \text {integral}& = \frac {(6+9 x) \int \frac {1}{x (6+9 x)} \, dx}{\sqrt {4+12 x+9 x^2}} \\ & = \frac {(6+9 x) \int \frac {1}{x} \, dx}{6 \sqrt {4+12 x+9 x^2}}-\frac {(3 (6+9 x)) \int \frac {1}{6+9 x} \, dx}{2 \sqrt {4+12 x+9 x^2}} \\ & = \frac {(2+3 x) \log (x)}{2 \sqrt {4+12 x+9 x^2}}-\frac {(2+3 x) \log (2+3 x)}{2 \sqrt {4+12 x+9 x^2}} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.07 (sec) , antiderivative size = 31, normalized size of antiderivative = 1.15 \[ \int \frac {1}{x \sqrt {4+12 x+9 x^2}} \, dx=\frac {(2+3 x) (\log (x)-\log (2+3 x))}{2 \sqrt {(2+3 x)^2}} \]

[In]

Integrate[1/(x*Sqrt[4 + 12*x + 9*x^2]),x]

[Out]

((2 + 3*x)*(Log[x] - Log[2 + 3*x]))/(2*Sqrt[(2 + 3*x)^2])

Maple [A] (verified)

Time = 0.35 (sec) , antiderivative size = 28, normalized size of antiderivative = 1.04

method result size
default \(\frac {\left (2+3 x \right ) \left (\ln \left (x \right )-\ln \left (2+3 x \right )\right )}{2 \sqrt {\left (2+3 x \right )^{2}}}\) \(28\)
risch \(\frac {\sqrt {\left (2+3 x \right )^{2}}\, \ln \left (x \right )}{6 x +4}-\frac {\sqrt {\left (2+3 x \right )^{2}}\, \ln \left (2+3 x \right )}{2 \left (2+3 x \right )}\) \(46\)
meijerg \(\frac {\ln \left (x \right )+\ln \left (3\right )-\ln \left (2\right )-\ln \left (1+\frac {3 x}{2}\right )}{\sqrt {\left (2+3 x \right )^{2}}}+\frac {3 x \left (\ln \left (x \right )+\ln \left (3\right )-\ln \left (2\right )-\ln \left (1+\frac {3 x}{2}\right )\right )}{2 \sqrt {\left (2+3 x \right )^{2}}}\) \(58\)

[In]

int(1/x/((2+3*x)^2)^(1/2),x,method=_RETURNVERBOSE)

[Out]

1/2*(2+3*x)*(ln(x)-ln(2+3*x))/((2+3*x)^2)^(1/2)

Fricas [A] (verification not implemented)

none

Time = 0.31 (sec) , antiderivative size = 13, normalized size of antiderivative = 0.48 \[ \int \frac {1}{x \sqrt {4+12 x+9 x^2}} \, dx=-\frac {1}{2} \, \log \left (3 \, x + 2\right ) + \frac {1}{2} \, \log \left (x\right ) \]

[In]

integrate(1/x/((2+3*x)^2)^(1/2),x, algorithm="fricas")

[Out]

-1/2*log(3*x + 2) + 1/2*log(x)

Sympy [F]

\[ \int \frac {1}{x \sqrt {4+12 x+9 x^2}} \, dx=\int \frac {1}{x \sqrt {\left (3 x + 2\right )^{2}}}\, dx \]

[In]

integrate(1/x/((2+3*x)**2)**(1/2),x)

[Out]

Integral(1/(x*sqrt((3*x + 2)**2)), x)

Maxima [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 24, normalized size of antiderivative = 0.89 \[ \int \frac {1}{x \sqrt {4+12 x+9 x^2}} \, dx=-\frac {1}{2} \, \left (-1\right )^{12 \, x + 8} \log \left (\frac {12 \, x}{{\left | x \right |}} + \frac {8}{{\left | x \right |}}\right ) \]

[In]

integrate(1/x/((2+3*x)^2)^(1/2),x, algorithm="maxima")

[Out]

-1/2*(-1)^(12*x + 8)*log(12*x/abs(x) + 8/abs(x))

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 21, normalized size of antiderivative = 0.78 \[ \int \frac {1}{x \sqrt {4+12 x+9 x^2}} \, dx=-\frac {1}{2} \, {\left (\log \left ({\left | 3 \, x + 2 \right |}\right ) - \log \left ({\left | x \right |}\right )\right )} \mathrm {sgn}\left (3 \, x + 2\right ) \]

[In]

integrate(1/x/((2+3*x)^2)^(1/2),x, algorithm="giac")

[Out]

-1/2*(log(abs(3*x + 2)) - log(abs(x)))*sgn(3*x + 2)

Mupad [B] (verification not implemented)

Time = 10.24 (sec) , antiderivative size = 23, normalized size of antiderivative = 0.85 \[ \int \frac {1}{x \sqrt {4+12 x+9 x^2}} \, dx=-\frac {\ln \left (\frac {6\,x+2\,\sqrt {{\left (3\,x+2\right )}^2}+4}{x}\right )}{2} \]

[In]

int(1/(x*((3*x + 2)^2)^(1/2)),x)

[Out]

-log((6*x + 2*((3*x + 2)^2)^(1/2) + 4)/x)/2